{extend name="./oscshop/admin/view/public/base.html" /}
{block name="content"}
<div class="page-header">
	
<h1>	
	移动端
	<small>
		<i class="ace-icon fa fa-angle-double-right"></i>
		{$breadcrumb1}
	</small>
	<small>
		<i class="ace-icon fa fa-angle-double-right"></i>
		代理管理
	</small>
</h1>	

</div>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table id="table" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						
						<th>用户</th> 
						<th>真实姓名</th>
						<th>代理区域</th>
						<th>所在区身份证前6位</th>  
						<th>加入时间</th>
						<th>团队会员数量</th>
						<th>区域归属人数</th>
						<th>状态</th>	
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="v" empty="$empty"}
						<tr>		
							<td>{$v.username}</td>
							<td>{:get_id_card_name($v.uid)}</td>

							<td>{$v.province}{$v.city}{$v.country}</td>
							<td>{$v.id6}</td>
							<td><?php echo date('Y-m-d',$v['create_time']); ?></td>
							
							<td> {$v.member|default='0'}人 </a></td>
							<td> {$v.usernum|default='0'}人 </a></td>
							<td>
								{switch name="v.state"}
									    {case value="0"}<span class="green bold">正在考核</span>{/case}
								        {case value="2"}<span class="red bold">考核不通过</span>{/case} 		
								         {case value="1"}<span class="red bold">考核通过</span>{/case} 						         
							    {/switch}
							</td>
							<td>
								<a href="{:url('AgentBackend/edit_agent',array('id'=>$v['agent_id']))}">编辑</a>
							</td>
						</tr>
						{/volist}	
						
						<tr>
							<td colspan="20" class="page">{$page->render()}</td>
						</tr>
						<tr>
							<td colspan="20" class="page">总计 {$page->total()|default="0"} 个代理</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}